//
//  KCUserInfo.m
//  KConnect
//
//  Created on 18/03/09.
//  Copyright 2009 Xtreme Labs Inc. All rights reserved.
//

#define kUserInfo     @"cpu"
#define kUID          @"s"
#define kBirthYear    @"b"
#define kGender       @"g"
#define kCity         @"ly"
#define kCountry      @"lc"
#define kState        @"ls"
#define kZIP          @"lp"
#define kFriendCount  @"f"

#import "KCUserInfo.h"

@implementation KCUserInfo

- (id)initWithUID:(NSString*)uid
{
  NSDictionary *required = [NSDictionary dictionaryWithObjectsAndKeys: uid, kUID, nil];
  
  if(self = [super initWithParameters:required])
  {
    
  }
  return self;
}

- (void)setBirthYear:(NSString*)year
{
  [self addOptionalParameter:kBirthYear value:year];
}

- (void)setGender:(NSString*)gender
{
  [self addOptionalParameter:kGender value:gender];
}

- (void)setCity:(NSString*)city
{
  [self addOptionalParameter:kCity value:city];
}

- (void)setCountry:(NSString*)country
{
  [self addOptionalParameter:kCountry value:country];
}

- (void)setState:(NSString*)state
{
  [self addOptionalParameter:kState value:state];
}

- (void)setFriendCount:(NSInteger)count
{
  [self addOptionalParameter:kFriendCount value:[NSString stringWithFormat:@"%d", count]];
}

- (NSString*)messageType
{
	return kUserInfo;
}

- (NSArray*)requiredParameters
{
  return [NSArray arrayWithObjects:kUID, nil];
}

- (NSArray*)optionalParameters
{
	return [NSArray arrayWithObjects:
            kBirthYear,  
            kGender,     
            kCity,       
            kCountry,    
            kState,      
            kZIP,        
            kFriendCount,
            nil];
}



@end
